package com.example.wssapp.fragment;

import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import com.example.wssapp.R;

public class Fragment1 extends Fragment implements View.OnClickListener {

	private Button fragButton;

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		View v = inflater.inflate(R.layout.frag_button, container, false);
		fragButton = (Button) v.findViewById(R.id.fragButton);
		fragButton.setOnClickListener(this);
		return v;
	}

	@Override
	public void onClick(View v) {
		((Fragment1.Fragment1Listener) getActivity()).onClickButton();
	}

	public static interface Fragment1Listener {

		public void onClickButton();
	}
	
}
